:root {
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji';
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
}

html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: #1e293b;
  background: #f8fafc;
  min-height: 100vh;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  margin: 0;
  color: #0f172a;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

/* 链接样式 */
a {
  color: #3b82f6;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2563eb;
}

/* 代码样式 */
code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  color: #2563eb;
  background: rgba(59, 130, 246, 0.1);
  padding: 0.2em 0.4em;
  border-radius: 0.25em;
}

pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

/* 深色模式 */
html.dark {
  color-scheme: dark;
}

html.dark body {
  color: #e2e8f0;
  background: #0f172a;
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
  color: #f1f5f9;
}

html.dark a {
  color: #60a5fa;
}

html.dark a:hover {
  color: #93c5fd;
}

html.dark code {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.1);
}

/* 移动端适配 */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
  h5, h6 { font-size: 1rem; }
} 